﻿<dialogs:Dialog x:Class="Supremacy.Client.Dialogs.SitRepDetailDialog"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:av="http://schemas.codeplex.com/wpfcontrib/xaml/presentation"
                xmlns:scc="clr-namespace:Supremacy.Client"
                xmlns:dialogs="clr-namespace:Supremacy.Client.Dialogs"
                IsModal="True"
                Width="640"
                MaxHeight="480">
  <dialogs:Dialog.Resources>
    <av:FormattedTextConverter x:Key="FormattedTextConverter" />
    <scc:EnumStringConverter x:Key="EnumStringAccessTextConverter"
                             AccessText="True" />
  </dialogs:Dialog.Resources>
  <dialogs:Dialog.CommandBindings>
    <CommandBinding Command="ApplicationCommands.Close"
                    Executed="ExecuteCloseCommand" />
  </dialogs:Dialog.CommandBindings>
  <DockPanel LastChildFill="True"
             TextBlock.TextAlignment="Left">
    <Image x:Name="DetailImage"
           DockPanel.Dock="Left"
           Width="225"
           Margin="0,0,14,0"
           VerticalAlignment="Top"
           Source="{Binding Path=DetailImage}" />
    <TextBlock DockPanel.Dock="Top"
               FontFamily="{DynamicResource ParagraphFont}"
               FontSize="14pt"
               Foreground="{DynamicResource HeaderTextBrush}"
               Margin="0,0,0,14"
               TextWrapping="Wrap"
               TextTrimming="None"
               Text="{Binding Path=HeaderText}" />
    <Button DockPanel.Dock="Bottom"
            HorizontalAlignment="Center"
            Command="ApplicationCommands.Close"
            IsDefault="True"
            Content="{scc:AccessText {Binding Source={x:Static dialogs:MessageDialogButtons.Close}, Converter={StaticResource EnumStringAccessTextConverter}, ConverterParameter=UpperCase}}"
            Margin="0,14,0,0" />
    <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                  VerticalScrollBarVisibility="Auto">
      <TextBlock FontFamily="{DynamicResource ParagraphFont}"
                 FontSize="12pt"
                 Foreground="{DynamicResource DefaultTextBrush}"
                 TextWrapping="Wrap"
                 TextTrimming="CharacterEllipsis"
                 av:BindingHelpers.Inlines="{Binding Path=DetailText, Converter={StaticResource FormattedTextConverter}}"/>
    </ScrollViewer>
  </DockPanel>
</dialogs:Dialog>
